package action.common;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.interceptor.ServletRequestAware;

import com.opensymphony.xwork2.ActionSupport;

public class LogoutAction extends ActionSupport implements ServletRequestAware {

    private static final long serialVersionUID = 1L;

    private HttpServletRequest request;

    public String execute() throws Exception {

        request.getSession().invalidate();

        System.out.println("Logout success");

        return SUCCESS;
    }

    public void setServletRequest(HttpServletRequest request) {

        this.request = request;
    }

}
